import {renderLoginPage, renderRegisterPage, submitLoginForm, submitRegisterForm} from "./DataRendering.js";
// 切换登录和注册表单
// 切换注册
document.getElementById('switch-to-register').addEventListener('click', e => {
    e.preventDefault();
    renderRegisterPage();
});
// 切换登录
document.getElementById('switch-to-login').addEventListener('click', e => {
    e.preventDefault();
    renderLoginPage()
});

// 注册表单验证
document.getElementById('register-form').addEventListener('submit', e => {
    e.preventDefault();
    submitRegisterForm();
});
// 登录表单验证
document.getElementById('login-form').addEventListener('submit', e => {
    e.preventDefault();
    submitLoginForm();
});
